﻿using JoyAdmin.Core;
using System.Collections;

namespace TuLing.Blazor.Dto
{
    public class TreeProductTypeDto : ITreeNode
    {
        public long Id { get; set; }
        public string Name { get; set; }
        public long ParentId { get; set; }
        public int Sort { get; set; }
        public List<TreeProductTypeDto> Children { get; set; } = new List<TreeProductTypeDto>();
        public long GetId() => Id;
        public long GetParentId() => ParentId;

        public void SetChildren(IList children)
        {
            Children = (List<TreeProductTypeDto>)children;
        }
    }
}
